import App from "./App";
import store from "./store/index.js";

// 导入并挂载全局的分享方法
import share from "@/common/share.js";

// import VConsole from 'vconsole'
// const vConsole = new VConsole()

// Vue.use(vConsole)
const validateStock = (goodsInfo, num) => {
  if (!goodsInfo.stock) return true;
  if (num > goodsInfo.remainStockNum) return false;
  return true;
};
import Vue from "vue";
Vue.prototype.$validateStock = validateStock;
Vue.config.productionTip = false;
Vue.mixin(share);
App.mpType = "app";
const app = new Vue({
  store,
  ...App,
});
app.$mount();
